package Ch13;

import java.math.BigDecimal;
import java.math.MathContext;

public class DecimalEx3 {

	public static void main(String[] args) {
		long l = 12345678;
		double d = l;
		System.out.println(d);
		System.out.println(d+1.23);
		System.out.println("----------------------");
		
		BigDecimal b1 = new BigDecimal(12345678);
		BigDecimal result =
				b1.add(new BigDecimal(1.23), new MathContext(10));
		System.out.println(result);
	}
}
